package com.avic.rong.fragment.showapi;

import com.avic.rong.api.HttpPostService;
import com.avic.rong.utils.SharedPreferencesUtil;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

/**
 * Created by TSJ-2018-0492 on 2019/8/12.
 */

public class FollowApi extends BaseApi{

    private String token;
    private String pageNo;
    private String pageSize;
    public FollowApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
    }

    public void setToken(String token) {
        this.token = token;
    }

    public void setPageNo(String pageNo) {
        this.pageNo = pageNo;
    }

    public void setPageSize(String pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService httpPostService = retrofit.create(HttpPostService.class);

        return httpPostService.getFollowList(SharedPreferencesUtil.getLoginToken(),pageNo,pageSize);
    }
}
